<template>

    <transition name="slide">
      <div class="modal">
        <div class="mask"></div>
        <div class="modal-dialog">
          <div class="modal-header">
            <span>{{ title }}</span>
            <a
              href="javascript:;"
              class="icon-close"
              @click="$emit('close')"
            ></a>
          </div>
          <div class="modal-body">
            <slot name="body"></slot>
          </div>
          <div class="modal-footer">
            <div class="btn-group">
              <a href="javascript:;" class="btn" @click="$emit('submit')"> {{ sureText }}</a>
              <a
                href="javascript:;"
                class="btn btn-default"
                @click="$emit('close')"
                >{{ cancelText }}</a
              >
            </div>
          </div>
        </div>
      </div>
    </transition>

</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Modal',
  props: {
    // 弹框类型：小small、中middle、大large、表单form
    modalType: {
      type: String,
      default: 'form'
    },
    // 弹框标题
    title: String,
    // 按钮类型: 1:确定按钮 2：取消按钮 3：确定取消
    btnType: String,
    sureText: {
      type: String,
      default: '确定'
    },
    cancelText: {
      type: String,
      default: '取消'
    }
    // showModal: Boolean
  },
  data() {
    return {}
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="scss">

@import '../../assets/scss/mixin.scss';
@import '../../assets/scss/config.scss';
@import '../../assets/scss/button.scss';
@import '../../assets/scss/modal.scss';
</style>
